A portion of the disclosure of this patent document contains material that is subject to copyright protection. The copyright owner has no objection to the facsimile reproduction by anyone of the patent disclosure, as it appears in the Patent and Trademark office patent files or records, but otherwise reserves all copyright rights whatsoever.
The present invention generally relates to object-oriented programming and in particular to a computer-implemented method for translating metamodel elements defined using a Metaobject Facility (MOF) into elements expressed using the Unified Modeling Language (UML) .
MOF metamodels are used to define metadata structures for a variety of application domains such as software modeling, data warehousing, component management, versioning, and so on. MOF defines the semantics and content structure of metamodels, but it does not define a way to graphically view a metamodel. On the other hand, UML provides a graphical language for displaying models. A metamodel is a special case of a model, so a metamodel can be viewed as a UML model. Hence there is a need for an automated method for creating a UML model from a MOF metamodel such that the UML model provides a graphical picture of the MOF metamodel.
UML provides a well-known modeling language supported by an ever-growing set of tools. Naturally, UML may be used to view metamodels. There is a need for a set of rules for making such a transformation from MOF to UML. There are two major challenges to creating a UML model from a MOF metamodel:
1) MOF has concepts, such as Reference, that are not supported by UML, yet these concepts need to be captured in a UML model so that complete metamodels can be viewed;
2) UML has much more diverse uses than metamodeling, so rules are needed that confine translation of a metamodel into UML to use appropriate UML concepts.
Therefore, there is a need for a method for creating a UML model from a MOF metamodel that captures all MOF concepts for display using appropriate UML constructs.
A co-pending patent application, Ser. No. 09/322,137 provides a method for converting a UML model to a MOF metamodel, but this method does not teach a reverse translation. For example, said method does not address MOF Import objects.
Also, said method fails to teach a way to adequately represent References in UML. If a reference is only implied by a navigational association end (as in the method disclosed in this co-pending application) then there is no way to show a navigable association end without a reference. But MOF allows for a navigable association end to exist without a reference. Further, MOF allows multiple references to be defined for a single association end. Hence, there is a need for rules for translating a MOF metamodel to UML that allow for the full flexibility of MOF with respect to References.
The method disclosed in the co-pending application also fails to imply a means for converting a MOF Constant to UML. A MOF metamodel can contain Constant objects, and a proper UML rendering of a metamodel must show its Constants. There is therefore a need for a method to translate MOF Constants for viewing in UML.
It is an object of the present invention to provide a reliable system and method that automatically converts a MOP metamodel to a UML model.
Another object of the present invention is to provide a set of rules for making a transformation from a MOF metamodel to a UML model.
Yet another object of the present invention is to provide a system and method that presents an entire metamodel in UML including each Reference, Import, and Constant.
Still another object of the present invention is to provide a system and method that provides predictable mapping from an original MOF metamodel to a UML model. This is possible because a UML model can contain Tagged Values that can contain MOF information not directly supported by UML.
These and other objects, which will become apparent as the invention is described in detail below, are provided by a computer-implemented method for translating a MOF metamodel into a UML Model. The method comprises the steps of reading each element of the MOF metamodel and determining the type of each MOF element read in the preceding step. After this, a translation process is selected for the type determined in the preceding step; and, the process selected in the preceding step is executed.
Still other objects, features and advantages of the present invention will become readily apparent to those skilled in the art from the following detailed description, wherein is shown and described only the preferred embodiment of the invention, simply by way of illustration of the best mode contemplated of carrying out the invention. As will be realized, the invention is capable of other and different embodiments, and its several details are capable of modifications in various obvious respects, all without departing from the invention. Accordingly, the drawings and description are to be regarded as illustrative in nature, and not as restrictive, and what is intended to be protected by Letters Patent is set forth in the appended claims. The present invention will become apparent when taken in conjunction with the following description and attached drawings, wherein like characters indicate like parts, and which drawings form a part of this application.